import React, {useEffect} from 'react';
import {View,} from '@tarojs/components';

import styles from './index.module.scss';
import {Arrow} from "@taroify/icons";

const Index: React.FC = () => {

    const coupons = [
        {name: '满折', info: '满100元减99.9元'},
        {name: '满折', info: '满100元减99.9元'},
        {name: '满折', info: '满100元减99.9元'},
        {name: '满折', info: '满100元减99.9元'},
        {name: '满折', info: '满100元减99.9元'},
        {name: '满折', info: '满100元减99.9元'}
    ]
    useEffect(() => {
        load();
    }, []);

    const load = async () => {

    }

    return (
        <View className={styles.page}>
            <View className={styles.page_head}>
                促销说明
            </View>
            <View className={styles.page_body}>
                {
                    coupons.map(({name, info}, index) => {
                        return <view key={index} className={styles.page_body_item}>
                            <view className={styles.page_body_item_left}>
                                <view className={styles.page_body_item_left_name}>{name}</view>
                                <view className={styles.page_body_item_left_info}>{info}</view>
                            </view>
                            <view className={styles.page_body_item_right}>
                                <Arrow size={12}></Arrow>
                            </view>

                        </view>
                    })
                }
            </View>
        </View>
    );
};

export default Index;
